using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._FileGeodatabase
{
    /// <summary>
    /// <para>Compact</para>
    /// <para>Compacts a file geodatabase. Compacting rearranges how the geodatabase is stored on disk, often reducing its size and improving performance.</para>
    /// <para>压缩文件地理数据库。压缩会重新排列地理数据库在磁盘上的存储方式，从而通常会减小其大小并提高性能。</para>
    /// </summary>    
    [DisplayName("Compact")]
    public class Compact : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Compact()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_workspace">
        /// <para>Input Workspace</para>
        /// <para>The file geodatabase to be compacted.</para>
        /// <para>要压缩的文件地理数据库。</para>
        /// </param>
        public Compact(object _in_workspace)
        {
            this._in_workspace = _in_workspace;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Compact";

        public override string CallName => "management.Compact";

        public override List<string> AcceptEnvironments => ["configKeyword", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_workspace, _out_workspace];

        /// <summary>
        /// <para>Input Workspace</para>
        /// <para>The file geodatabase to be compacted.</para>
        /// <para>要压缩的文件地理数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_workspace { get; set; }


        /// <summary>
        /// <para>Updated Input Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_workspace { get; set; }


        public Compact SetEnv(object configKeyword = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}